set(NET_SRC_DIR ${PROJECT_ROOT}/net)
set(NET_INC_DIR ${PROJECT_ROOT}/net/include)

qelib_include_directories(${NET_INC_DIR})

# sources
qelib_sources_ifdef(
    CONFIG_NET
    ${NET_SRC_DIR}/net.c
    ${NET_SRC_DIR}/ip.c
    ${NET_SRC_DIR}/ping.c
    ${NET_SRC_DIR}/eth.c
)

# install headers
qelib_install_headers_ifdef(
    CONFIG_NET
    ${NET_INC_DIR}/net.h
    ${NET_INC_DIR}/eth.h
    ${NET_INC_DIR}/ping.h
)

# arp
qelib_sources_ifdef(CONFIG_NET_ARP ${NET_SRC_DIR}/arp.c)
qelib_install_headers_ifdef(CONFIG_NET_ARP ${NET_INC_DIR}/arp.h)